-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(KONFLUX-4136): add new reduce step #1969
feat(KONFLUX-4136): add new reduce step #1969
Conversation
scoheb
commented
Sep 17, 2024
- add new step to reduce snapshot for single component mode
- requires feat(KONFLUX-4136): new reduce-snapshot script #1968
f666b12
to
dcc6954
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1969 +/- ##
=======================================
Coverage 74.11% 74.11%
=======================================
Files 88 88
Lines 5729 5729
=======================================
Hits 4246 4246
Misses 1483 1483
Flags with carried forward coverage won't be shown. Click here to find out more. |
@@ -177,7 +212,7 @@ spec: | |||
- image | |||
- "--verbose" | |||
- "--images" | |||
- "$(params.IMAGES)" | |||
- "$(params.HOMEDIR)/snapshot.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be $(params.SNAPSHOT_PATH)
?
Also, not sure if we want to expose this as a parameter to the user. It seems more like an implementation detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for Integration Test Scenarios
, SNAPSHOT is the json representation of the snapshot.
for Release Pipelines
, SNAPSHOT will be the path to the json file.
With my latest PR #1972 , I am always outputting a JSON file that will either contain the complete Snapshot
or the reduced one.
so yes, once that PR merges, I can use $(params.SNAPSHOT_PATH)
.
It seems more like an implementation detail
Are you meaning to say it should not a param, and I am simply hard-code /tekton/home/snapshot.json
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you meaning to say it should not a param, and I am simply hard-code /tekton/home/snapshot.json?
Yeah, exactly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's minor, but I'd rather reduce the amount of parameters introduced. We can always add it later if there's a need. That's easier than removing a parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed parameter and using the already defined HOME
parameter in the arg
type: string | ||
default: "false" | ||
|
||
- name: CUSTOM_RESOURCE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name and description of this parameter, and the one below, should reflect that is associated with SINGLE_COMPONENT
mode. Consider:
- name: SINGLE_COMPONENT_NAME
description: >
Name, including kind, of the Kubernetes resource to query for labels when single
component mode is enabled, e.g. pr/somepipeline.
- name: SINGLE_COMPONENT_NAMESPACE
description: >
Kubernetes namespace where the SINGLE_COMPONENT_NAME is found. Only used
when single component mode is enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe SINGLE_COMPONENT_CR
and SINGLE_COMPONENT_NS
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ever not a pipeline run? Maybe SINGLE_COMPONENT_PR ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you need to specify the kind, the implication is it might be something other than a PipelineRun. Is that the intention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have to change it, then I would prefer SINGLE_COMPONENT_CUSTOM_RESOURCE
and SINGLE_COMPONENT_CUSTOM_RESOURCE_NAMESPACE
Is it ever not a pipeline run? Maybe SINGLE_COMPONENT_PR ?
Yes in Release Pipelines, it is a Snapshot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer
SINGLE_COMPONENT_CUSTOM_RESOURCE
andSINGLE_COMPONENT_CUSTOM_RESOURCE_NAMESPACE
Works for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's quite long I guess. SINGLE_COMPONENT_CUSTOM_RESOURCE_NS
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am ok with SINGLE_COMPONENT_CUSTOM_RESOURCE
and SINGLE_COMPONENT_CUSTOM_RESOURCE_NS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
I think the acceptance test failure is legit: |
yes. hence #1972 |
8757e8d
to
2fa7e16
Compare
/ok-to-test |
Let's just get the commits organized to better represent the change before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm, but please do a squash as suggested elsewhere.
- add new step to reduce snapshot for single component mode Signed-off-by: Scott Hebert <[email protected]>
2258b53
to
908b47d
Compare